package com.ibeeking.found.common.enums;
/**
 *  @ClassName OpenApiConfigEnum
 * @Author ibeeking
 * @Date 2021/7/5 10:46
 * @Version 1.0
 * @Description 开放平台类型定义
 */
public enum OpenApiConfigEnum {
    OPEN_CONFIG_TYPE_WECHAT_OPEN(1,"微信开放平台"),
    OPEN_CONFIG_TYPE_WECHAT_CP(2,"企业微信平台"),
    OPEN_CONFIG_TYPE_ALIPAY_OPEN(4,"支付宝开放平台"),
    OPEN_CONFIG_TYPE_DINGTALK_OPEN(5,"钉钉开放平台"),
    OPEN_CONFIG_TYPE_TIKTOK_OPEN(6,"抖音开放平台"),
    OPEN_CONFIG_TYPE_TIKTOK_TP_OPEN(7,"抖音开放平台"),
    OPEN_CONFIG_TYPE_MEITUAN_OPEN(8,"美团开放平台"),
    OPEN_CONFIG_TYPE_ELE_OPEN(9,"饿了么开放平台"),
    ;

    private Integer code;
    private String value;

    OpenApiConfigEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByCode(Integer code) {
        for (OpenApiConfigEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getValue();
            }
        }
        return null;
    }
}
